﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucListAlbumRightSlide.ascx.cs"
    Inherits="SES.CMS.AdminCP.PageUC.ucListAlbumRightSlide" %>
<h2>
    Album slide bên phải</h2>
<asp:GridView ID="gvAt" DataKeyNames="SlideID" runat="server" AutoGenerateColumns="False"
    BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
    CellPadding="4" OnRowDeleting="gvAt_RowDeleting" OnSelectedIndexChanged="gvAt_SelectedIndexChanged"
    PageSize="100" Width="100%" OnRowCommand="gvAt_RowCommand">
    <RowStyle BackColor="White" ForeColor="#330099" />
    <Columns>
        <asp:TemplateField HeaderText="STT">
            <ItemTemplate>
                <%# Container.DataItemIndex + 1 %>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:BoundField DataField="Title" HeaderText="Tiêu đề" SortExpression="Title" />
        <asp:BoundField DataField="eTitle" HeaderText="Tiêu đề TA" SortExpression="eTitle" />
        <asp:BoundField DataField="SlideUrl" HeaderText="Link" SortExpression="SlideUrl" />
        <asp:TemplateField HeaderText="Hình ảnh">
            <ItemTemplate>
                <asp:Image ID="imgVideo" ImageUrl='<%#"~/Media/" + Eval("SlideImg") %>' runat="server"
                    Width="100px" Height="60px" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Thao tác">
            <ItemTemplate>
                <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" CommandArgument='<%#Eval("SlideID")%>' CausesValidation="false"
                    ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("SlideID") %>' CausesValidation="false"
                    CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
</asp:GridView>
<div style="margin-top: 20px;">
    <asp:Button runat="server" ID="btnAdd" Text="Thêm ảnh" onclick="btnAdd_Click" />
    <asp:Panel runat="server" ID="panel" Visible="false">
    <h2>Thêm ảnh cho slide</h2>
    <table width="100%" border="1">
        <tr>
            <td class="style8">
                Tiêu đề:
            </td>
            <td class="style9">
                <asp:TextBox ID="txtTitle" runat="server" Width="179px" ValidationGroup="submitGrp"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                    ErrorMessage="*** Cần nhập tiêu đề" ValidationGroup="submitGrp"></asp:RequiredFieldValidator>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td class="style8">
                Tiêu đề TA:
            </td>
            <td class="style9">
                <asp:TextBox ID="txteTitle" runat="server" Width="179px" ValidationGroup="submitGrp"></asp:TextBox>
            </td>
        </tr>
        <tr id="trDes" runat="server" visible="true">
            <td class="style8">
                Mô tả:
            </td>
            <td>
                <asp:TextBox ID="txtDescription" TextMode="MultiLine" runat="server" Width="90%">
                </asp:TextBox>
            </td>
        </tr>
        <tr id="tr1" runat="server" visible="true">
            <td class="style8">
                Mô tả TA:
            </td>
            <td>
                <asp:TextBox ID="txteDescription" TextMode="MultiLine" runat="server" Width="90%">
                </asp:TextBox>
            </td>
        </tr>
        <tr id="tr2" runat="server" visible="true">
            <td class="style8">
                Link ảnh:
            </td>
            <td>
                <asp:TextBox ID="txtLinkAnh" runat="server" Width="90%">
                </asp:TextBox>
            </td>
        </tr>
        <tr runat="server" id="trPopup">
            <td class="style8">
                Hình ảnh
            </td>
            <td class="style9">
                <asp:FileUpload ID="fuImage" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;
            </td>
            <td class="style4">
                <asp:Button ID="btnSave" runat="server" Text="Lưu" OnClick="btnSave_Click" ValidationGroup="submitGrp" />
                <asp:Button ID="btnReset" runat="server" Text="Hủy" OnClick="btnReset_Click" />
            </td>
        </tr>
    </table>
    </asp:Panel>
</div>
